package com.guigu.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.guigu.mapper.BackMapper;
import com.guigu.pojo.Back;
import com.guigu.pojo.Orders;
import com.guigu.service.BackService;
import com.guigu.service.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Mr.Zhang
 * @since 2025-04-07
 */
@Service
public class BackServiceImpl extends ServiceImpl<BackMapper, Back> implements BackService {

    @Autowired
    private BackMapper backMapper;

    @Autowired
    private OrdersService ordersService;

    @Override
    public Boolean updateBackTag(String orderNumber, String backTag) {
        Orders orders = ordersService.selectByOrderNo(orderNumber);
        if (orders!=null){
            orders.setBackTag(backTag);
            ordersService.updateById(orders);
        }
        return true;
    }
}
